package com.dwxt.cdms.controller;

import com.dwxt.cdms.entity.HealthReport;
import com.dwxt.cdms.service.HealthReportService;
import com.dwxt.common.annotation.ValidateFiled;
import com.dwxt.common.annotation.ValidateGroup;
import com.dwxt.common.base.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* @Description: 健康月度报告
* @Author chendq
* @Date 2022/1/17
**/
@RequestMapping("/cdms/healthReport")
@RestController
public class HealthReportController {

    @Autowired
    private HealthReportService healthReportService;


    @RequestMapping("/select")
    @ValidateGroup(fileds = {
            @ValidateFiled(index = 0, filedName = "year", notNull = true),
            @ValidateFiled(index = 0, filedName = "month", notNull = true),
            @ValidateFiled(index = 0, filedName = "customerId", notNull = true)}
    )
    public BaseResult select(HealthReport healthReport) {
        return healthReportService.select(healthReport);
    }

}

